package com.kili.picture.service.task;

import com.kili.picture.service.PictureService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @author Jar
 * @Date 2019/4/3
 */
@Service
public class TempFileCleanTask {

    private static final Logger logger = LoggerFactory.getLogger(TempFileCleanTask.class);

    @Autowired
    private PictureService pictureService;

    @Scheduled(cron = "0 0 01 * * ?")
    public void testFixRate() {
        logger.info("temp file clean task");
        pictureService.tempFileClean();
    }

}
